/*
 * EarGuitarTrainer.h
 *
 *  Created on: Jun 9, 2010
 *      Author: Mario Rodriguez Huizar
 */
#ifndef EARGUITARTRAINER_H
#define EARGUITARTRAINER_H

#include <QtGui/QWidget>
#include "ui_EarGuitarTrainer.h"
#include <Phonon/MediaObject>
#include <vector>

using namespace std;

typedef struct sound{
	QString name;
	QString fileName;
	QCheckBox *pCheckBox;
	QPushButton *pButton;
} Sound;

class EarGuitarTrainer : public QWidget, public Ui_EarGuitarTrainerClass{
	Q_OBJECT

public:
	EarGuitarTrainer(QWidget *parent = 0);
	~EarGuitarTrainer();

private slots:
    void tick(qint64 time);
    void stateChanged(Phonon::State newState, Phonon::State /* oldState */);
    void on_pbHitIt_clicked();
    void on_pbPlay_clicked();
    void on_pbStop_clicked();
    void on_bgAnswers_buttonClicked(QAbstractButton * button);
    void finished();

private:
    // informs us of the state of the playback and properties of the media it is playing back
	Phonon::MediaObject *mediaObject;  //  and controls the playback
	Phonon::AudioOutput *audioOutput;  // can output the audio to a sound device
	vector<sound> sounds;              // vector of all the sounds that could be played
	int randomChord;                   // a number that represent the chord to be played

};

#endif // EARGUITARTRAINER_H
